﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPFClient
{
    /// <summary>
    /// Pop up window which asks user for current and new password to allow the password to be changed.
    /// Uses same logic as AddFriend.
    /// </summary>
    public partial class ChangePass : Window
    {
        public delegate void DoneHandler();
        public event DoneHandler done; //sends signal that button pressed
        public ChangePass()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //when button pressed
            done(); //sends signal that it has been pressed
        }

        //returns contents of two password boxes on request from MainWindow
        public String getCurrent()
        {
            return passwordBox1.Password;
        }
        public String getNew()
        {
            return passwordBox2.Password;
        }
    }
}
